package org.tsinghua.answer.domain.subject;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

public interface SubjectRepository extends PagingAndSortingRepository<Subject, String> {
	
	@Override
	@Query("select s from Subject s order by s.ordernum DESC, s.id")
	List<Subject> findAll();
	
	@Override
	List<Subject> findAll(Iterable<String> ids);

}
